Optimal. Leaf size=127 \[ \frac {(f+g x) \left (d^2 g+e^2 f x\right )}{4 d^2 e^2 \left (d^2-e^2 x^2\right )^2}+\frac {\left (3 e^2 f^2-d^2 g^2\right ) \tanh ^{-1}\left (\frac {e x}{d}\right )}{8 d^5 e^3}+\frac {x \left (3 e^2 f^2-d^2 g^2\right )+2 d^2 f g}{8 d^4 e^2 \left (d^2-e^2 x^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 127, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {739, 639, 208} \[ \frac {x \left (3 e^2 f^2-d^2 g^2\right )+2 d^2 f g}{8 d^4 e^2 \left (d^2-e^2 x^2\right )}+\frac {\left (3 e^2 f^2-d^2 g^2\right ) \tanh ^{-1}\left (\frac {e x}{d}\right )}{8 d^5 e^3}+\frac {(f+g x) \left (d^2 g+e^2 f x\right )}{4 d^2 e^2 \left (d^2-e^2 x^2\right )^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 208
Rule 639
Rule 739
Rubi steps
\begin {align*} \int \frac {(f+g x)^2}{\left (d^2-e^2 x^2\right )^3} \, dx &=\frac {\left (d^2 g+e^2 f x\right ) (f+g x)}{4 d^2 e^2 \left (d^2-e^2 x^2\right )^2}-\frac {\int \frac {-3 e^2 f^2+d^2 g^2-2 e^2 f g x}{\left (d^2-e^2 x^2\right )^2} \, dx}{4 d^2 e^2}\\ &=\frac {\left (d^2 g+e^2 f x\right ) (f+g x)}{4 d^2 e^2 \left (d^2-e^2 x^2\right )^2}+\frac {2 d^2 f g+\left (3 e^2 f^2-d^2 g^2\right ) x}{8 d^4 e^2 \left (d^2-e^2 x^2\right )}-\frac {\left (-\frac {3 e^2 f^2}{d^2}+g^2\right ) \int \frac {1}{d^2-e^2 x^2} \, dx}{8 d^2 e^2}\\ &=\frac {\left (d^2 g+e^2 f x\right ) (f+g x)}{4 d^2 e^2 \left (d^2-e^2 x^2\right )^2}+\frac {2 d^2 f g+\left (3 e^2 f^2-d^2 g^2\right ) x}{8 d^4 e^2 \left (d^2-e^2 x^2\right )}+\frac {\left (3 e^2 f^2-d^2 g^2\right ) \tanh ^{-1}\left (\frac {e x}{d}\right )}{8 d^5 e^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 110, normalized size = 0.87 \[ \frac {d^5 e g (4 f+g x)+d^3 e^3 x \left (5 f^2+g^2 x^2\right )+\left (d^2-e^2 x^2\right )^2 \left (3 e^2 f^2-d^2 g^2\right ) \tanh ^{-1}\left (\frac {e x}{d}\right )-3 d e^5 f^2 x^3}{8 d^5 e^3 \left (d^2-e^2 x^2\right )^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.26, size = 252, normalized size = 1.98 \[ \frac {8 \, d^{5} e f g - 2 \, {\left (3 \, d e^{5} f^{2} - d^{3} e^{3} g^{2}\right )} x^{3} + 2 \, {\left (5 \, d^{3} e^{3} f^{2} + d^{5} e g^{2}\right )} x + {\left (3 \, d^{4} e^{2} f^{2} - d^{6} g^{2} + {\left (3 \, e^{6} f^{2} - d^{2} e^{4} g^{2}\right )} x^{4} - 2 \, {\left (3 \, d^{2} e^{4} f^{2} - d^{4} e^{2} g^{2}\right )} x^{2}\right )} \log \left (e x + d\right ) - {\left (3 \, d^{4} e^{2} f^{2} - d^{6} g^{2} + {\left (3 \, e^{6} f^{2} - d^{2} e^{4} g^{2}\right )} x^{4} - 2 \, {\left (3 \, d^{2} e^{4} f^{2} - d^{4} e^{2} g^{2}\right )} x^{2}\right )} \log \left (e x - d\right )}{16 \, {\left (d^{5} e^{7} x^{4} - 2 \, d^{7} e^{5} x^{2} + d^{9} e^{3}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.17, size = 127, normalized size = 1.00 \[ \frac {{\left (d^{2} g^{2} - 3 \, f^{2} e^{2}\right )} e^{\left (-3\right )} \log \left (\frac {{\left | 2 \, x e^{2} - 2 \, {\left | d \right |} e \right |}}{{\left | 2 \, x e^{2} + 2 \, {\left | d \right |} e \right |}}\right )}{16 \, d^{4} {\left | d \right |}} + \frac {{\left (d^{2} g^{2} x^{3} e^{2} + d^{4} g^{2} x + 4 \, d^{4} f g - 3 \, f^{2} x^{3} e^{4} + 5 \, d^{2} f^{2} x e^{2}\right )} e^{\left (-2\right )}}{8 \, {\left (x^{2} e^{2} - d^{2}\right )}^{2} d^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.02, size = 298, normalized size = 2.35 \[ \frac {g^{2}}{16 \left (e x -d \right )^{2} d \,e^{3}}-\frac {g^{2}}{16 \left (e x +d \right )^{2} d \,e^{3}}+\frac {f g}{8 \left (e x -d \right )^{2} d^{2} e^{2}}+\frac {f g}{8 \left (e x +d \right )^{2} d^{2} e^{2}}+\frac {f^{2}}{16 \left (e x -d \right )^{2} d^{3} e}-\frac {f^{2}}{16 \left (e x +d \right )^{2} d^{3} e}+\frac {g^{2}}{16 \left (e x -d \right ) d^{2} e^{3}}+\frac {g^{2}}{16 \left (e x +d \right ) d^{2} e^{3}}-\frac {f g}{8 \left (e x -d \right ) d^{3} e^{2}}+\frac {f g}{8 \left (e x +d \right ) d^{3} e^{2}}+\frac {g^{2} \ln \left (e x -d \right )}{16 d^{3} e^{3}}-\frac {g^{2} \ln \left (e x +d \right )}{16 d^{3} e^{3}}-\frac {3 f^{2}}{16 \left (e x -d \right ) d^{4} e}-\frac {3 f^{2}}{16 \left (e x +d \right ) d^{4} e}-\frac {3 f^{2} \ln \left (e x -d \right )}{16 d^{5} e}+\frac {3 f^{2} \ln \left (e x +d \right )}{16 d^{5} e} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.45, size = 152, normalized size = 1.20 \[ \frac {4 \, d^{4} f g - {\left (3 \, e^{4} f^{2} - d^{2} e^{2} g^{2}\right )} x^{3} + {\left (5 \, d^{2} e^{2} f^{2} + d^{4} g^{2}\right )} x}{8 \, {\left (d^{4} e^{6} x^{4} - 2 \, d^{6} e^{4} x^{2} + d^{8} e^{2}\right )}} + \frac {{\left (3 \, e^{2} f^{2} - d^{2} g^{2}\right )} \log \left (e x + d\right )}{16 \, d^{5} e^{3}} - \frac {{\left (3 \, e^{2} f^{2} - d^{2} g^{2}\right )} \log \left (e x - d\right )}{16 \, d^{5} e^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.10, size = 114, normalized size = 0.90 \[ \frac {\frac {x^3\,\left (d^2\,g^2-3\,e^2\,f^2\right )}{8\,d^4}+\frac {f\,g}{2\,e^2}+\frac {x\,\left (d^2\,g^2+5\,e^2\,f^2\right )}{8\,d^2\,e^2}}{d^4-2\,d^2\,e^2\,x^2+e^4\,x^4}-\frac {\mathrm {atanh}\left (\frac {e\,x}{d}\right )\,\left (d^2\,g^2-3\,e^2\,f^2\right )}{8\,d^5\,e^3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.00, size = 144, normalized size = 1.13 \[ - \frac {- 4 d^{4} f g + x^{3} \left (- d^{2} e^{2} g^{2} + 3 e^{4} f^{2}\right ) + x \left (- d^{4} g^{2} - 5 d^{2} e^{2} f^{2}\right )}{8 d^{8} e^{2} - 16 d^{6} e^{4} x^{2} + 8 d^{4} e^{6} x^{4}} + \frac {\left (d^{2} g^{2} - 3 e^{2} f^{2}\right ) \log {\left (- \frac {d}{e} + x \right )}}{16 d^{5} e^{3}} - \frac {\left (d^{2} g^{2} - 3 e^{2} f^{2}\right ) \log {\left (\frac {d}{e} + x \right )}}{16 d^{5} e^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________